package javaio;

import java.io.*;

/**
 * Created by Administrator on 2017/5/27.
 */
public class Test1 {

    public static void main(String[] args) throws IOException {
        File file = new File("E:\\xxx.txt");
        FileInputStream inputStream = new FileInputStream(file);
        FileReader reader = new FileReader(file);

        char[] buf = new char[1024];
        int read;
        StringBuffer buffer = new StringBuffer();
        while((read = reader.read(buf))>0){
            buffer.append(buf);
        }
        System.out.println(buffer.toString());
    }
}
